generate and install pkgconfig file
authorIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>
Thu, 21 Jan 2016 21:03:26 +0000 (22:03 +0100)
committerIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>
Thu, 21 Jan 2016 21:03:26 +0000 (22:03 +0100)
debian/libbuilder/Makefile
debian/libbuilder/juce.pc.in [new file with mode: 0644]

index 3a2f70a41c48e33ecc91c9e56eb195fbde2933d1..e5566b34f7d9136260b9ed85eb94eae2c9e562d4 100644 (file)
@@ -105,7 +105,7 @@ TARGET := libjuce.so
 
 OBJECTS=$(SOURCES:%.cpp=$(OBJDIR)/%.o)
 
-.PHONY: clean install install-lib install-headers test
+.PHONY: clean install install-lib install-headers install-pkgconfig test
 
 $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)
        @echo Linking juce_dll
@@ -119,20 +119,35 @@ $(OBJDIR)/%.o: %.cpp
 clean:
        @echo Cleaning juce_dll
        rm -rf build
+       rm -rf juce.pc
 
 install-lib: $(OUTDIR)/$(TARGET)
        @echo Installing juce_dll
        install -d $(DESTDIR)$(libdir)
        install -m664 $^ $(DESTDIR)$(libdir)/libjuce.so
+install-pkgconfig: juce.pc
+       @echo Installing juce_dll
+       install -d $(DESTDIR)$(libdir)/pkgconfig
+       install -m664 $^ $(DESTDIR)$(libdir)/pkgconfig/$^
 install-headers:
        @echo Installing juce_dll
        install -d $(DESTDIR)$(includedir)/juce
        cd $(JUCE_PATH) && find modules/ -type f -name "juce_*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \;
        cd $(JUCE_PATH) && find modules/juce_box2d/box2d/ -type f -name "*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \;
 
-install: install-headers install-lib
+install: install-headers install-lib install-pkgconfig
 
 -include $(OBJECTS:%.o=%.d)
 
 test:
        @echo TARGET_ARCH $(TARGET_ARCH)
+
+juce.pc: juce.pc.in
+       sed \
+               -e 's|@prefix@|$(prefix)|g' \
+               -e 's|@libdir@|$(libdir)|g' \
+               -e 's|@includedir@|$(includedir)|g' \
+               -e 's|@PACKAGE_VERSION@|$(SONAME)|g' \
+               -e 's|@REQUIRED_PKG@|$(JUCELIBS)|g' \
+               -e 's|@REQUIRED_LIBS@|$(JUCELIBS_LIBS)|g' \
+               $^ > $@
diff --git a/debian/libbuilder/juce.pc.in b/debian/libbuilder/juce.pc.in
new file mode 100644 (file)
index 0000000..7620e89
--- /dev/null
@@ -0,0 +1,17 @@
+# JUCE pkg-config file for Debian
+
+prefix=@prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+###############################
+# core configuration
+Name: juce
+Description: Jules' Utility Class Extensions
+Version: @PACKAGE_VERSION@
+Requires.private: @REQUIRED_PKG@
+Cflags: -I${includedir}/juce
+Libs: -ljuce
+Libs.private: @REQUIRED_LIBS@
+
+